From 3163a0822c7192b2f57c517dcfddaeabda776197 Mon Sep 17 00:00:00 2001 From: Harmandeep Kaur Date: Wed, 10 Feb 2016 16:49:38 +0530 Subject: [PATCH] libxc: fix leak in xc_offline_page error path Avoid leaking the mapping of the m2p in one of the possible failure cases. Coverity CID 1351225 Signed-off-by: Harmandeep Kaur Reviewed-by: Dario Faggioli Acked-by: Ian Jackson --- tools/libxc/xc_offline_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c index bc91d51483..3248a345a0 100644 --- a/tools/libxc/xc_offline_page.c +++ b/tools/libxc/xc_offline_page.c @@ -504,7 +504,7 @@ int xc_exchange_page(xc_interface *xch, int domid, xen_pfn_t mfn) if ( xc_map_domain_meminfo(xch, domid, &minfo) ) { PERROR("Could not map domain's memory information\n"); - return -1; + goto failed; } /* For translation macros */ -- 2.30.2